<extend name="Public/base" />

<block name="wrapper">
	<div class="row">
		<div class="col-lg-12">
			<div class="panel panel-default">
				<div class="panel-heading">车辆详情添加页</div>
				<!-- /.panel-heading -->
				<div class="panel-body">
					<div class="dataTable_wrapper">
					
					<form action="{:U('Info/insert')}" method="post">
							<table border="1" width="500" cellspacing="0" >

								<tr>
									<td>
										品牌ID:
										<select name="tid" id="pinpai">
											<option value="">--请选择--</option>
											<foreach name="data" item="vo">

												<option value="{$vo['id']}">{$vo['typename']}</option>

											</foreach>
										</select>

									</td>

									<td>
										车系：
										<select name="xid" id="chexi" value="">
											<option value="">--请选择--</option>

										</select>

									</td>
								</tr>

								<tr>
									<td>上牌时间:</td>
									<td>
										<input class="form-control" placeholder="" name="ontime" type="date" value=""></td>
								</tr>
								<tr>
									<td>行程(万公里):</td>
									<td>
										<input class="form-control" placeholder="mile" name="mile" type="mileage" value=""></td>
								</tr>
								<tr>
									<td>车主报价(万元) ￥：</td>
									<td>
										<input class="form-control" placeholder="price" name="price" type="number" value=""></td>
								</tr>
								<tr>
									<td>新车价格(万元) ￥:</td>
									<td>
										<input class="form-control" placeholder="nprice" name="nprice" type="number" value=""></td>
								</tr>
								<tr>
									<td>降价金额(万元) ￥:</td>
									<td>
										<input class="form-control" placeholder="sale" name="sale" type="number" value=""></td>
								</tr>


								<tr>
									<td>排量:</td>
									<td>
										<input class="form-control" placeholder="gas" name="gas" type="text" value=""></td>
								</tr>
								<tr>
									<td>排放标准:</td>
									<td>
										<input class="form-control" placeholder="standard" name="standard" type="text" value=""></td>
								</tr>
								<tr>
									<td>上架时间:</td>
									<td>
										<input class="form-control" placeholder="uptime" name="uptime" type="date" value=""></td>
								</tr>

								<tr>

									<td>上牌城市:</td>
									<td>
										<input class="form-control" placeholder="city" name="city" type="city" value=""></td>
								</tr>
								<tr>

									<td>所在城市:</td>
									<td>
										<input class="form-control" placeholder="oncity" name="city" type="city" value=""></td>
								</tr>
								<tr>
									<td>型号:</td>
									<td>
										<input class="form-control" placeholder="series" name="series" type="text" value=""></td>
								</tr>
								<tr>
									<td>舒适度:</td>
									<td>
										<input class="form-control" placeholder="comfort" name="comfort" type="text" value=""></td>
								</tr>

								<tr>

									<td colspan="2" align="center">
										<input type="submit" value="确认"></td>
								</tr>

							</table>

						</form>
                   <script src="__PUBLIC__/jquery-1.8.3.min.js"></script>
						<script type="text/javascript">
                       var id,xid;
                    $(function(){

                       $('#pinpai').change(function(){

                           id =  $(this).val();

                         // console.log(id); 
                         var str = '<option>--请选择--</option>';
                          $.post('{:U('Info/change')}',{id:id},function(msg){

                              // console.log(msg);
                              for(var i in msg){
                              	// console.log(msg[i]);

                              	str +='<option value="'+msg[i]['id']+'">'+msg[i]['typename']+'</option>';

                              	//console.log(str);


                              }

                            $('#chexi').html(str);



                          });



                       })


                  })
                  

                </script>

					</div>
					<!-- /.table-responsive -->
				</div>
				<!-- /.panel-body -->
			</div>
			<!-- /.panel -->
		</div>
		<!-- /.col-lg-12 -->
	</div>

</block>